package DailyPractice.Day33;

import java.util.Scanner;

/**
 * @author lumin
 * @date 2022/05/31 21:59
 **/
class Fibonacci {
    Fibonacci(int from, int to) {
        len = to;
        num = new long[len];
        num[0] = 1;
        if (len > 1)
            num[1] = 1;
        sum = 0;
        setFib(from);
    }
    private void setFib(int from) {
        for(int i = 2; i < len; i++) {
            num[i] = num[i - 1] + num[i - 2];
        }
        sum = num[from - 1];
        for(int i = from; i < len; i++)
            sum += num[i];
    }
    public long getFib(){
        return sum;
    }
    private int len;
    private long[] num;
    private long sum;
}


public class Num2 {
    public static void main(String[] args) {
        Scanner cin = new Scanner(System.in);
        while (cin.hasNext()) {
            Fibonacci fib = new Fibonacci(cin.nextInt(), cin.nextInt());
            System.out.println(fib.getFib());
        }
        cin.close();
    }
}